Is there a way to use your own image in place of the automatic one that ASP
uses when doing editing in your DataGrid pages?
We already have a style of button we are using and would like to be
consistant.
Thanks,
Tom. 9 4582
tshad wrote: Is there a way to use your own image in place of the automatic one that ASP uses when doing editing in your DataGrid pages?
We already have a style of button we are using and would like to be consistant.
Tom, are you using an EditCommandColumn for the Edit/Update/Cancel
buttons in the DataGrid, and are wanting to replace those with a custom
image file? If this is the case, all you have to do is set the
EditText, CancelText, UpdateText properties of the EditCommandColumn to
the appropriate HTML (i.e., <img src=edit.gif>, or what have you).
If you are wanting, instead, to apply a CSS style (which you last
sentence makes it sound like), see this FAQ: http://datawebcontrols.com/faqs/Butt...rButtons.shtml
Happy Programming!
--
Scott Mitchell mi******@4guysfromrolla.com http://www.4GuysFromRolla.com
* When you think ASP.NET, think 4GuysFromRolla.com!
"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message
news:41************@4guysfromrolla.com... tshad wrote: Is there a way to use your own image in place of the automatic one that ASP uses when doing editing in your DataGrid pages?
We already have a style of button we are using and would like to be consistant. Tom, are you using an EditCommandColumn for the Edit/Update/Cancel buttons in the DataGrid, and are wanting to replace those with a custom image file? If this is the case, all you have to do is set the EditText, CancelText, UpdateText properties of the EditCommandColumn to the appropriate HTML (i.e., <img src=edit.gif>, or what have you).
Yes.
<asp:EditCommandColumn EditText="Edit Info"
visible="true"
ButtonType="PushButton"
UpdateText="Update" CancelText="Cancel" />
Where would I put the imgs? I assume I would take out the EditText,
UpdateText and CancelText. Where would I put it if it were Edit.png,
Update.png and Cancel.png?
Where is a good place to find properties for each object (DataGrid,
EditCommandColumn etc)? I am always scrambling to find out how to set a
background or font property and the names are always different depending
whether you are using CSS or HTML or ASP.NET. If you are wanting, instead, to apply a CSS style (which you last sentence makes it sound like), see this FAQ: http://datawebcontrols.com/faqs/Butt...rButtons.shtml
I am looking at this also. At the moment, I need a quick and dirty way to
do this.
Thanks,
Tom Happy Programming!
--
Scott Mitchell mi******@4guysfromrolla.com http://www.4GuysFromRolla.com
* When you think ASP.NET, think 4GuysFromRolla.com!
tshad wrote: "Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message news:41************@4guysfromrolla.com...
tshad wrote:
Is there a way to use your own image in place of the automatic one that ASP uses when doing editing in your DataGrid pages?
We already have a style of button we are using and would like to be consistant. Tom, are you using an EditCommandColumn for the Edit/Update/Cancel buttons in the DataGrid, and are wanting to replace those with a custom image file? If this is the case, all you have to do is set the EditText, CancelText, UpdateText properties of the EditCommandColumn to the appropriate HTML (i.e., <img src=edit.gif>, or what have you).
Yes. <asp:EditCommandColumn EditText="Edit Info" visible="true" ButtonType="PushButton" UpdateText="Update" CancelText="Cancel" />
Where would I put the imgs? I assume I would take out the EditText, UpdateText and CancelText. Where would I put it if it were Edit.png, Update.png and Cancel.png?
<asp:EditCommandColumn EditText="<img src='Edit.png'>" ... />
Where is a good place to find properties for each object (DataGrid, EditCommandColumn etc)? I am always scrambling to find out how to
set > a background or font property and the names are always different depending whether you are using CSS or HTML or ASP.NET.
The technical documentation's a good start. If you download the .NET
SDK, or if you have Visual Studio .NET installed on your computer, you
have an offline documentation resource. There's also Google, MSDN, etc.
For example, to find the DataGrid properties just Google using:
site: http://msdn.microsoft.com DataGrid class http://www.google.com/search?sourcei...DataGrid+class
Whose first link is: http://msdn.microsoft.com/library/de...ClassTopic.asp
Also, if you're going to be doing a lot of work with the DataGrid, might
I suggest you pick up a copy of my book, ASP.NET Data Web Controls Kick
Start? It's 350+ pages on nothin' but the DataGrid, DataList, and Repeater:
Sample Chapter: http://www.4guysfromrolla.com/webtech/chapters/ASPDWC/
Buy it: http://www.4guysfromrolla.com/aspscr...oto.asp?ID=148
Happy Programming!
--
Scott Mitchell mi******@4guysfromrolla.com http://www.4GuysFromRolla.com
* When you think ASP.NET, think 4GuysFromRolla.com!
"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message
news:41**************@4guysfromrolla.com... tshad wrote: "Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message news:41************@4guysfromrolla.com...
tshad wrote:
Is there a way to use your own image in place of the automatic one that ASP uses when doing editing in your DataGrid pages?
We already have a style of button we are using and would like to be consistant.
Tom, are you using an EditCommandColumn for the Edit/Update/Cancel buttons in the DataGrid, and are wanting to replace those with a custom image file? If this is the case, all you have to do is set the EditText, CancelText, UpdateText properties of the EditCommandColumn to the appropriate HTML (i.e., <img src=edit.gif>, or what have you).
Yes. <asp:EditCommandColumn EditText="Edit Info" visible="true" ButtonType="PushButton" UpdateText="Update" CancelText="Cancel" />
Where would I put the imgs? I assume I would take out the EditText, UpdateText and CancelText. Where would I put it if it were Edit.png, Update.png and Cancel.png?
<asp:EditCommandColumn EditText="<img src='Edit.png'>" ... />
Where is a good place to find properties for each object (DataGrid, EditCommandColumn etc)? I am always scrambling to find out how to set > a background or font property and the names are always different depending whether you are using CSS or HTML or ASP.NET.
The technical documentation's a good start. If you download the .NET SDK, or if you have Visual Studio .NET installed on your computer, you have an offline documentation resource. There's also Google, MSDN, etc. For example, to find the DataGrid properties just Google using:
site:http://msdn.microsoft.com DataGrid class
http://www.google.com/search?sourcei...DataGrid+class
Whose first link is: http://msdn.microsoft.com/library/de...ClassTopic.asp
That helps a lot. Also, if you're going to be doing a lot of work with the DataGrid, might I suggest you pick up a copy of my book, ASP.NET Data Web Controls Kick Start? It's 350+ pages on nothin' but the DataGrid, DataList, and Repeater:
Sample Chapter: http://www.4guysfromrolla.com/webtech/chapters/ASPDWC/ Buy it: http://www.4guysfromrolla.com/aspscr...oto.asp?ID=148
Already have it and use it and really like it.
I was just looking for someway to have at my fingertips a list of properties
and methods of the controls that I can quickly access to get the correct
spelling or format of a particular property. For example: do I use bkground
or background or color or font-color.
Thanks,
Tom Happy Programming!
--
Scott Mitchell mi******@4guysfromrolla.com http://www.4GuysFromRolla.com
* When you think ASP.NET, think 4GuysFromRolla.com!
But guys if i do (Does the image has to be in "PNG" and not "GIF":-
<asp:EditCommandColumn EditText="<img src='Edit.png'>" />
it works but when i DO
<asp:EditCommandColumn
HeaderText="Editing"
EditText="<img src='im_cancel.gif'>"
UpdateText="Update"
CancelText="Cancel"
ButtonType="PushButton" />
IT DOESN"T?
"tshad" wrote: "Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message news:41**************@4guysfromrolla.com... tshad wrote: "Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message news:41************@4guysfromrolla.com...
tshad wrote:
>Is there a way to use your own image in place of the automatic one that >ASP uses when doing editing in your DataGrid pages? > >We already have a style of button we are using and would like to be >consistant.
Tom, are you using an EditCommandColumn for the Edit/Update/Cancel buttons in the DataGrid, and are wanting to replace those with a custom image file? If this is the case, all you have to do is set the EditText, CancelText, UpdateText properties of the EditCommandColumn to the appropriate HTML (i.e., <img src=edit.gif>, or what have you).
Yes. <asp:EditCommandColumn EditText="Edit Info" visible="true" ButtonType="PushButton" UpdateText="Update" CancelText="Cancel" />
Where would I put the imgs? I assume I would take out the EditText, UpdateText and CancelText. Where would I put it if it were Edit.png, Update.png and Cancel.png?
<asp:EditCommandColumn EditText="<img src='Edit.png'>" ... />
Where is a good place to find properties for each object (DataGrid, EditCommandColumn etc)? I am always scrambling to find out how to set > a background or font property and the names are always different depending whether you are using CSS or HTML or ASP.NET.
The technical documentation's a good start. If you download the .NET SDK, or if you have Visual Studio .NET installed on your computer, you have an offline documentation resource. There's also Google, MSDN, etc. For example, to find the DataGrid properties just Google using:
site:http://msdn.microsoft.com DataGrid class
http://www.google.com/search?sourcei...DataGrid+class
Whose first link is: http://msdn.microsoft.com/library/de...ClassTopic.asp
That helps a lot.
Also, if you're going to be doing a lot of work with the DataGrid, might I suggest you pick up a copy of my book, ASP.NET Data Web Controls Kick Start? It's 350+ pages on nothin' but the DataGrid, DataList, and Repeater:
Sample Chapter: http://www.4guysfromrolla.com/webtech/chapters/ASPDWC/ Buy it: http://www.4guysfromrolla.com/aspscr...oto.asp?ID=148
Already have it and use it and really like it.
I was just looking for someway to have at my fingertips a list of properties and methods of the controls that I can quickly access to get the correct spelling or format of a particular property. For example: do I use bkground or background or color or font-color.
Thanks,
Tom Happy Programming!
--
Scott Mitchell mi******@4guysfromrolla.com http://www.4GuysFromRolla.com
* When you think ASP.NET, think 4GuysFromRolla.com!
So it only works if the ButtonType is type LinkButton Not PushButton
Well all good!
"Patrick.O.Ige" wrote: But guys if i do (Does the image has to be in "PNG" and not "GIF":-
<asp:EditCommandColumn EditText="<img src='Edit.png'>" />
it works but when i DO
<asp:EditCommandColumn HeaderText="Editing" EditText="<img src='im_cancel.gif'>" UpdateText="Update" CancelText="Cancel" ButtonType="PushButton" /> IT DOESN"T?
"tshad" wrote:
"Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message news:41**************@4guysfromrolla.com... tshad wrote: > "Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message > news:41************@4guysfromrolla.com... > >>tshad wrote: >> >>>Is there a way to use your own image in place of the automatic one that >>>ASP uses when doing editing in your DataGrid pages? >>> >>>We already have a style of button we are using and would like to be >>>consistant. >> >>Tom, are you using an EditCommandColumn for the Edit/Update/Cancel >>buttons in the DataGrid, and are wanting to replace those with a custom >>image file? If this is the case, all you have to do is set the EditText, >>CancelText, UpdateText properties of the EditCommandColumn to the >>appropriate HTML (i.e., <img src=edit.gif>, or what have you). > > > Yes. > <asp:EditCommandColumn EditText="Edit Info" > visible="true" > ButtonType="PushButton" > UpdateText="Update" CancelText="Cancel" /> > > Where would I put the imgs? I assume I would take out the EditText, > UpdateText and CancelText. Where would I put it if it were Edit.png, > Update.png and Cancel.png?
<asp:EditCommandColumn EditText="<img src='Edit.png'>" ... />
> Where is a good place to find properties for each object (DataGrid, > EditCommandColumn etc)? I am always scrambling to find out how to set > a background or font property and the names are always different > depending whether you are using CSS or HTML or ASP.NET.
The technical documentation's a good start. If you download the .NET SDK, or if you have Visual Studio .NET installed on your computer, you have an offline documentation resource. There's also Google, MSDN, etc. For example, to find the DataGrid properties just Google using:
site:http://msdn.microsoft.com DataGrid class
http://www.google.com/search?sourcei...DataGrid+class
Whose first link is: http://msdn.microsoft.com/library/de...ClassTopic.asp
That helps a lot.
Also, if you're going to be doing a lot of work with the DataGrid, might I suggest you pick up a copy of my book, ASP.NET Data Web Controls Kick Start? It's 350+ pages on nothin' but the DataGrid, DataList, and Repeater:
Sample Chapter: http://www.4guysfromrolla.com/webtech/chapters/ASPDWC/ Buy it: http://www.4guysfromrolla.com/aspscr...oto.asp?ID=148
Already have it and use it and really like it.
I was just looking for someway to have at my fingertips a list of properties and methods of the controls that I can quickly access to get the correct spelling or format of a particular property. For example: do I use bkground or background or color or font-color.
Thanks,
Tom Happy Programming!
--
Scott Mitchell mi******@4guysfromrolla.com http://www.4GuysFromRolla.com
* When you think ASP.NET, think 4GuysFromRolla.com!
I find that it works, but it also puts a blue border around it for some
reason.
If I have it as an imagebutton it looks fine with no border around it:
<asp:ImageButton ID="ExpandButton" runat="server"
Font-Size="2" ImageUrl="../images/edit.png" Width="16" Height="16"
CommandName="Select" AlternateText="Click here to see
details"></asp:ImageButton>
If I have it as part of the EditCommandColumn I get this blue border. The
background colors are grey and orange that alternate.
<asp:EditCommandColumn EditText="<img
src='..\images\Edit.png' >" visible="true"
ButtonType="LinkButton"
UpdateText="<img src='..\images\update.png'>"
CancelText="<img src='..\images\Cancel.png'>" />
The background colors are exactly the same for the ImageButton.
There is no border if I use the normal edittext button.
Why the border?
Thanks,
Tom.
"Patrick.O.Ige" <Pa*********@discussions.microsoft.com> wrote in message
news:C9**********************************@microsof t.com... So it only works if the ButtonType is type LinkButton Not PushButton Well all good!
"Patrick.O.Ige" wrote:
But guys if i do (Does the image has to be in "PNG" and not "GIF":-
<asp:EditCommandColumn EditText="<img src='Edit.png'>" />
it works but when i DO
<asp:EditCommandColumn HeaderText="Editing" EditText="<img src='im_cancel.gif'>" UpdateText="Update" CancelText="Cancel" ButtonType="PushButton" /> IT DOESN"T?
"tshad" wrote:
> "Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in message > news:41**************@4guysfromrolla.com... > > tshad wrote: > >> "Scott Mitchell [MVP]" <mi******@4guysfromrolla.com> wrote in > >> message > >> news:41************@4guysfromrolla.com... > >> > >>>tshad wrote: > >>> > >>>>Is there a way to use your own image in place of the automatic one > >>>>that > >>>>ASP uses when doing editing in your DataGrid pages? > >>>> > >>>>We already have a style of button we are using and would like to be > >>>>consistant. > >>> > >>>Tom, are you using an EditCommandColumn for the Edit/Update/Cancel > >>>buttons in the DataGrid, and are wanting to replace those with a > >>>custom > >>>image file? If this is the case, all you have to do is set the > >>>EditText, > >>>CancelText, UpdateText properties of the EditCommandColumn to the > >>>appropriate HTML (i.e., <img src=edit.gif>, or what have you). > >> > >> > >> Yes. > >> <asp:EditCommandColumn EditText="Edit Info" > >> visible="true" > >> ButtonType="PushButton" > >> UpdateText="Update" CancelText="Cancel" /> > >> > >> Where would I put the imgs? I assume I would take out the EditText, > >> UpdateText and CancelText. Where would I put it if it were > >> Edit.png, > >> Update.png and Cancel.png? > > > > <asp:EditCommandColumn EditText="<img src='Edit.png'>" ... /> > > > > > Where is a good place to find properties for each object (DataGrid, > > > EditCommandColumn etc)? I am always scrambling to find out how to > > set > a background or font property and the names are always > > different > > > depending whether you are using CSS or HTML or ASP.NET. > > > > The technical documentation's a good start. If you download the .NET > > SDK, > > or if you have Visual Studio .NET installed on your computer, you > > have an > > offline documentation resource. There's also Google, MSDN, etc. For > > example, to find the DataGrid properties just Google using: > > > > site:http://msdn.microsoft.com DataGrid class > > > > http://www.google.com/search?sourcei...DataGrid+class > > > > Whose first link is: > > http://msdn.microsoft.com/library/de...ClassTopic.asp > > That helps a lot. > > > > > Also, if you're going to be doing a lot of work with the DataGrid, > > might I > > suggest you pick up a copy of my book, ASP.NET Data Web Controls Kick > > Start? It's 350+ pages on nothin' but the DataGrid, DataList, and > > Repeater: > > > > Sample Chapter: > > http://www.4guysfromrolla.com/webtech/chapters/ASPDWC/ > > Buy it: http://www.4guysfromrolla.com/aspscr...oto.asp?ID=148 > > Already have it and use it and really like it. > > I was just looking for someway to have at my fingertips a list of > properties > and methods of the controls that I can quickly access to get the > correct > spelling or format of a particular property. For example: do I use > bkground > or background or color or font-color. > > Thanks, > > Tom > > > > Happy Programming! > > > > -- > > > > Scott Mitchell > > mi******@4guysfromrolla.com > > http://www.4GuysFromRolla.com > > > > * When you think ASP.NET, think 4GuysFromRolla.com! > > >
Hi Tom,
You are right.But if you don't want the border do border='0' like
below.
Patrick
<asp:EditCommandColumn EditText="<img
src='..\images\Edit.png' >" visible="true"
ButtonType="LinkButton"
UpdateText="<img src='..\images\update.png' border='0'>"
CancelText="<img src='..\images\Cancel.png' border='0'>" />
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
"naija naija" <pa*********@crazyjohns.com.au> wrote in message
news:%2******************@TK2MSFTNGP09.phx.gbl... Hi Tom, You are right.But if you don't want the border do border='0' like below. Patrick <asp:EditCommandColumn EditText="<img src='..\images\Edit.png' >" visible="true" ButtonType="LinkButton" UpdateText="<img src='..\images\update.png' border='0'>" CancelText="<img src='..\images\Cancel.png' border='0'>" />
That did it.
Thanks,
Tom.
*** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jphelan |
last post by:
I am developping a software program that covers a range of nonprofit
organization management needs through various modules. I am looking
for images/symbols to use with buttons for navigating with....
|
by: Mike P |
last post by:
I have a datagrid with a 'Delete' column that the user can click on to
delete a row in the datagrid. I thought that I would need to have some
kind of error handling in case somebody goes into the...
|
by: Pavel Gusak |
last post by:
Hello.
I've found DataGrid built-in edit functionality useless. My DataGrid has 9
columns, and is shown just nice until I press 'Edit' on a row. ASP.NET
creates 9 TextBoxes, all the same very big...
|
by: sumit |
last post by:
Hi,
I want to add one java script function on the click of
page button of datagrid. But how to get UI control of page
button so that i should be able to add attribute for
onClick event.
...
|
by: Stewart |
last post by:
Sorry for the cross post. Not sure which forum covers
these issues:
I'm hoping someone can help me figure out what I'm missing
in my code.
I am trying to configure a Datagrid for editing. So...
|
by: Jeff User |
last post by:
Hello
..NET 1.1, VS 2003, C# & asp.net
I have tried to follow msdn instructions and samples but I can not get
an event to fire for this button on the datagrid.
There has to be something obvious...
|
by: William Krick |
last post by:
I'm currently using the following custom Stylish style sheet in
Firefox 2.0.0.11...
*{ color: black !important ; background: none !important; background-
color: white !important }
a:link {...
|
by: shalini166 |
last post by:
I place command button in datagrid.
When i click one button in the column.Another form or other datagrid will open.
i don't how to make click event for column in the datagrid.please help me.
...
|
by: priyamtheone |
last post by:
I have a datagridview with a button column as one of its column collection. The width of the button column is say 50 but the problem is the button editing control within the cell of that column is...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |